package com.huwaiwai.akka.demo01;

import akka.actor.UntypedAbstractActor;

/**
 * Created by huweiwei on 2017/5/16.
 */
public class Greeter extends UntypedAbstractActor {

    public enum Msg {
        GREET, DONE
    }

    @Override
    public void onReceive(Object msg) throws Throwable {
        if (msg == Msg.GREET) {
            System.out.println("helloWorld");
            getSender().tell(Msg.DONE, getSelf());
        } else {
            unhandled(msg);
        }
    }
}
